package bn;

import java.util.Vector;

import main.Main;
import env.City;

public class ArmyNode
{
	public City						city;
	public double					p;
	public Vector<TerroristNode>	terroristSons;

	public ArmyNode(City city)
	{
		this.city = city;
		terroristSons = new Vector<TerroristNode>();
		p = Main.pArmy;

	}

	public void addTerroristNode(TerroristNode newSon)
	{
		terroristSons.add(newSon);
	}

	public double notArmy()
	{
		return 1 - p;
	}

	public String output()
	{
		String ans = new String();
		ans += "VERTEX " + city.getName() + ": army\n" + "  p(army) = " + p
				+ "\n" + "  p(not army) = " + notArmy() + "\n";
		return ans;
	}
}
